#!/usr/bin/perl -w
#
# $Id: PacketBox.pm,v 1.3 2003/07/09 22:53:13 solovam Exp $
#
# This file is a part of gkismet
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
#

#
# PacketBox class
#
package PacketBox;

use Gtk;
use Misc;
use InfoBox;
use strict;
@PacketBox::ISA = qw(InfoBox);

my @labels = ('Networks', 'Packets', 'Crypt', 'Weak', 'Noise', 'Dropped', 'Rate');

#
# Get list of labels
#
sub getLabels
{
	my $self = shift;
	return(@labels);
}

#
# Get frame label text
#
sub getTitle
{
	return 'Packet stats';
}

#
# Get value by label
#
sub getValue
{
	my $self = shift;
	my $label = shift;
	return $self->{'connection'}->getInfo()->{lc($label)};
}

#
# Is it out update?
#
sub isInterestingUpdate
{
        my $self = shift;
        my $data = shift;

        if($data->{'changed'} eq 'info')
        {
                return $true;
        }
        else
        {
                return $false;
        }
}

1;
